#include <iostream>
using namespace std;

// begin 指向数组首地址，end 指向尾后地址
void print(const int* begin, const int* end) {
    while (begin != end) {
        cout << *begin++ << " ";
    }
    cout << endl;
}
void test() {
    int j[] = { 0, 1, 2 };
    print(begin(j), end(j));
}
int main() {
    test();
    return 0;
}